{% import "macros.html" as macros %}

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="chrome=1">
        <meta name="HandheldFriendly" content="True">
        <meta name="MobileOptimized" content="320">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="referrer" content="no-referrer">

        <link rel="stylesheet" href="{{ get_url(path='fonts.css') }}">
        <link rel="stylesheet" href="{{ get_url(path='style.css') }}">

        <title>{% block htmltitle %}{{ config.title }}{% endblock htmltitle %}</title>

        {% if config.generate_rss %}
            <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path='rss.xml') }}">
        {% endif %}
    </head>
    <body>
        {% block body %}
            <div class="section" id="splash">
                {% if config.extra.sam_menu %}
                    {% for link in config.extra.sam_menu %}
                        <div class="big-link">
                            <a href="{{ link.link }}">
                                {{ link.text }}
                            </a>
                        </div>
                    {% endfor %}
                {% else %}
                    {% for current in section.subsections %}
                        {% set current = get_section(path=current) %}
                        <div class="big-link">
                            <a href="{{ current.permalink }}">
                                {{ macros::title_or_last(component=current) }}
                            </a>
                        </div>
                    {% endfor %}
                {% endif %}
            </div>
        {% endblock body %}
    </body>
</html>
